feat: use packageurl-js for correct PURL encoding across ecosystems#155
Conversation
Replace hand-rolled PURL string building with packageurl-js to correctly handle scoped npm packages (%40 encoding), golang namespace/name splitting, and maven groupId:artifactId format. Also fix API response PURL reconstruction to include the namespace field, so scoped packages like @babel/core are not truncated to just "core". Add integration tests for npm scoped, pypi, golang, maven, nuget, and cargo ecosystems. Made-with: Cursor
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary
packageurl-jsfor PURL construction instead of hand-rolled string building, correctly handling scoped npm packages (%40encoding), golang namespace/name splitting, and mavengroupId:artifactIdformatnamespacefield, so scoped packages like@babel/coreare no longer truncated tocoreTest plan
buildPurlunit tests cover all ecosystems (npm scoped/unscoped, pypi, gem, golang, maven, nuget, cargo)Made with Cursor